package baidu.com.matedemo.base;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import baidu.com.matedemo.DemoConstant;

/**
 * Created by niufei01 on 2017/12/29.
 */

public class BaseIntent {

    public static void showFragmentAct(Activity activity, String title, Class<?> cls, Bundle bundle) {
        Intent intent = new Intent();
        intent.putExtra(DemoConstant.EXTRA_TITLE, title);
        intent.putExtra(DemoConstant.EXTRA_FRAGMENT_TYPE, cls.getName());
        if (bundle != null) {
            intent.putExtras(bundle);
        }
        intent.setClass(activity, BaseActivity.class);
        activity.startActivity(intent);
    }

}
